<?php
/**
 * View parcial para campo form admin
 * @param campo
 * @param cabecalho
 * @param valor
 * @param caminho
 * @param required
 */
$campo = $this->campo;
$cabecalho = $this->cabecalho;
$valor = $this->valor;
$caminho = (empty($this->caminho)) ? 'arquivos/' : $this->caminho;

?>
<label for="<?php echo $campo; ?>"><?php echo $cabecalho; ?></label>
<input class="text-input small-input {validate: {required: <?php echo ((isset($this->required) && $this->required == false) || (!empty($this->r) && (!empty($valor )))) ? 'false' : 'true'; ?>}}" type="file" id="<?php echo $campo; ?>" name="<?php echo $campo; ?>" />
<div class="break"></div>
<div class="sep10"></div>
<?php
if (@!empty($valor)) {
?>
	<video id="video" class="video-js vjs-default-skin" controls
	  preload="auto" width="640" height="320" poster=""
	  data-setup="{}">
	  <source src="<?php echo $this->baseUrl($caminho . $valor); ?>" type='video/mp4'>
	</video>
	
	<label>
		<div class="break"></div>
		<input type="checkbox" name="apagar_<?php echo $campo; ?>" />
		Apagar arquivo?
	</label>
<?php
}
?>